package com.lil.shiro.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lil.shiro.dao.UserMapper;
import com.lil.shiro.model.User;
import com.lil.shiro.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceimpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public User findByLoginName(String user_id) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<User>();
        queryWrapper.eq("user_id", user_id);
        return baseMapper.selectOne(queryWrapper);
    }

    @Override
    public User findUserInfo(String userId) {
        return baseMapper.findUserInfo(userId);
    }
}
